
<div class="col-sm-12 ml10" name="eva-plan-detail">
	<!-- BOX -->
	<div class="box content-color nopadding-vertical nopadding-left ">
		<div class="box-body">
			<div class="row">
				<div class="panel-box shadow">
					<div class="col-xs-12 nopadding-left">
							<p class="user-add-btn inline-block">
								{{#if isBaseTenant}}
									{{#if detailEdit}}
									{{else}}
										{{#ui/form-function editAction="detailEditClick" detailEditClick="detailEditClick"
										removeAction="delPlan" delPlan="delPlan" clickActParams=evaInfo}}
										{{/ui/form-function}}
									{{/if}}
								{{else}}
									{{#if isStandardModel}}
									{{else}}
										{{#if detailEdit}}
										{{else}}
											{{#ui/form-function editAction="detailEditClick" detailEditClick="detailEditClick"
											removeAction="delPlan" delPlan="delPlan" clickActParams=evaInfo}}
											{{/ui/form-function}}
										{{/if}}
									{{/if}}
								{{/if}}

							</p>
					</div>

					<div class="col-xs-12 mt20 nopadding-left">
						{{#bs-form formLayout=formLayout model=evaModel invalid=(action "invalid")}}
						<div class="col-sm-5 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon">模板标题：</span>
								{{#if detailEdit}}
								{{#bs-form-element class="inline-block form-input-group" controlType="title"  property="title" }}
								{{input type="text" class="full-width inline-block form-input-group form-control"  value=evaInfo.title}}
								{{/bs-form-element}}
								{{else}}
								<div class="input-group-content">{{evaInfo.title}}</div>
								{{/if}}
							</div>
						</div>
						{{#if detailEdit}}
						<div class="col-sm-3 nopadding-right pull-right">
							<div class="form-input-group">
								<span class="input-group-addon">模板状态：</span>
								<select class="input-group-content" onchange={{action 'chooseStatus' value="target.value"}}>
									<option value="0" selected={{canUse}}>可用</option>
		              <option value="1" selected={{noUse}}>禁用</option>
		            </select>
							</div>
						</div>
						{{/if}}
						<div class="col-sm-12 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon">模板说明：</span>
								{{#if detailEdit}}
								{{#if id}}
								{{#bs-form-element class="inline-block form-input-group" controlType="remark"  property="remark" }}
								{{textarea type="text" class="full-width inline-block form-input-group form-control"  value=evaInfo.remark}}
								{{/bs-form-element}}
								{{else}}
								{{#bs-form-element class="inline-block form-input-group" controlType="remark"  property="remark" }}
								{{textarea type="text" class="full-width inline-block form-input-group form-control"  value=evaInfo.remark placeholder='模板说明'}}
								{{/bs-form-element}}
								{{/if}}
								{{else}}
								<div class="input-group-content">{{evaInfo.remark}}</div>
								{{/if}}
							</div>
						</div>
						{{/bs-form}}
						<div class="col-sm-12 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon question-btn">评估问题：
									{{#if detailEdit}}
									{{#ui/icon-button iconClass="fa fa-trash-o pull-right incon-button-font"
									data-toggle="tooltip"  title="删除问题"  data-placement="top" data-original-title="删除"
									clickAction="delTheQuestion" delTheQuestion="delTheQuestion"}}
									{{/ui/icon-button}}
									{{#ui/icon-button iconClass="fa fa-plus-circle pull-right incon-button-font" name="add-question"
									data-toggle="tooltip"  title="新增问题"  data-placement="top" data-original-title="新增"
									clickAction="addNewQuestion" addNewQuestion="addNewQuestion"}}
									{{/ui/icon-button}}
									{{/if}}
								</span>

							</div>
						</div>
						<div class="col-sm-12 question-list" name="question-list">
							<div class="box-body overflow-hidden fullWidth">
								<div class="list-content">
									{{#each questionList as |question index|}}
										<div class="col-sm-12 panel nopadding-left nopadding-right mb0">
											<div class="panel-heading pointer nopadding-bottom"  >
												{{#if detailEdit}}
												<i class="{{if question.hasSelected 'fa-check-square-o' 'fa-square-o'}}" {{action 'chooseQuestion' question on="click"}}></i>
												{{else}}
												<i style="width:12px;display:inline-block;"></i>
												{{/if}}
												<div class="{{if detailEdit 'title' ''}} inline-block" {{action 'detailQuestion' question on="click"}}>
													{{question.seq}}、{{question.content}}</div>
											</div>
											<div class="panel-body nopadding-top nopadding-bottom">
												{{#each question.answerList as |answer index|}}
												{{#unless answer.hasHidden}}
													<div class="col-sm-12 mt10">
														{{answer.curIndex}}、
														<span style="display:inline-block;width:36px;font-size:12px;color:red;">({{answer.score}}分)</span>
														<span>{{answer.content}}</span>
													</div>
													{{/unless}}
												{{/each}}
											</div>
										</div>
									{{/each}}

								</div>
							</div>
						</div>
						<!--分数范围-->
						<div class="col-sm-12 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon question-btn">评估得分范围：最低分({{minScore}})~最高分({{maxScore}})
									{{#if detailEdit}}
									{{#ui/icon-button iconClass="fa fa-trash-o pull-right incon-button-font"
									data-toggle="tooltip"  title="删除分数等级"  data-placement="top" data-original-title="删除"
									clickAction="delScore" delScore="delScore"}}
									{{/ui/icon-button}}
									{{#ui/icon-button iconClass="fa fa-plus-circle pull-right incon-button-font" name="add-score"
									data-toggle="tooltip"  title="新增分数等级"  data-placement="top" data-original-title="新增"
									clickAction="addNewScoreScope" addNewScoreScope="addNewScoreScope"}}
									{{/ui/icon-button}}
									{{/if}}
								</span>

							</div>
						</div>
						<div class="col-sm-12 question-list nopadding-left">
							<div class="box-body overflow-hidden fullWidth">
								<div class="list-content">
										<div class="col-sm-12 panel pl nopadding-right mb0">
											<div class="panel-heading nopadding-top nopadding-bottom">
												<div class="{{if detailEdit 'title' ''}} inline-block" >
													<div class="col-xs-12 nopadding-left">
														<table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-hover dataTable" aria-describedby="datatable1_info">
										          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
										            {{#each scoreScopeList as |score|}}
										            <tr>

																	<td class="ellipsis nopadding-right" style="line-height:37px;font-size:14px;vertical-align: middle;">
																		{{#if detailEdit}}
																		<i class="{{if score.hasSelected 'fa-check-square-o' 'fa-square-o'}}" {{action 'chooseScoreScope' score on="click"}}></i>
																		{{else}}
																		<div class="inline-block" style="width:12px;"></div>
																		{{/if}}
																	</td>

										              <td class="ellipsis" {{action 'detailScoreScope' score on="click"}} width=20%>
																		<div class="form-input-group">
																			<span class="input-group-addon ">评估得分在</span>
																			<div class="input-group-content center">{{score.minScore}}</div>
																			<span class="input-group-addon">~</span>
																			<div class="input-group-content center">{{score.maxScore}}</div>
																		</div>
																	</td>
										              <td class="ellipsis"  {{action 'detailScoreScope' score on="click"}}>
																		<div class="form-input-group">
																			<span class="input-group-addon">之间为：</span>
																			<div class="consult-content-group">{{score.remark}}</div>
																		</div>
																	</td>
										              <td class="ellipsis" {{action 'detailScoreScope' score on="click"}} width=30%>
																		<div class="form-input-group">
																			{{#if sourceType}}
																			<span class="input-group-addon">自理能力等级：</span>
																			<div class="input-group-content">{{score.actionLevel.typename}}</div>
																			{{else}}
																			<span class="input-group-addon">对应护理等级：</span>
																			<div class="input-group-content">{{score.level.name}}</div>
																			{{/if}}
																		</div>
																	</td>
										            </tr>
										            {{/each}}
										          </tbody>
										        </table>
													</div>
												</div>
											</div>
										</div>
								</div>
							</div>
						</div>
				</div>
				<div class="col-sm-12">
				<div class="text-center padding-top30">
						<p class="text-center user-add-btn" style="display:inline-block;margin:0 auto!important ">
						{{#if detailEdit}}
						{{#ui/mix-button class="user-btn edit-btn" id="saveScore" iconClass="fa fa-check"  text='保存' clickAction="savePlan" savePlan="savePlan"}}
						{{/ui/mix-button}}
						{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-mail-reply"  text='取消'  clickAction="detailCancel" detailCancel="detailCancel" }}
						{{/ui/mix-button}}
						{{else}}
						{{/if}}
						</p>
				</div>
			</div>
			</div>
		</div>
	</div>
</div>
<!-- /BOX -->
</div>

<!--修改评分范围弹层-->
{{#if detailScoreScope}}
{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")}}
{{#bs-modal-body}}
{{#bs-form formLayout=formLayout model=scoreModel invalid=(action "invalid")}}
	<div class="col-sm-12 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">等级最低分(必填)：</span>
			{{bs-form-element property="minScore" class="form-input-group full-width" controlType="minScore" placeholder='最低分(含)'}}

		</div>
	</div>
	<div class="col-sm-12 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">等级最高分(必填)：</span>
			{{bs-form-element property="maxScore" class="form-input-group full-width" controlType="maxScore" placeholder='最高分'}}

		</div>
	</div>
	<div class="col-sm-12 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">备注说明：</span>
			{{bs-form-element property="remark" class="form-input-group full-width" controlType="remark" placeholder='备注说明'}}
		</div>
	</div>
	<div class="col-sm-5 nopadding-left">
		<div class="form-input-group">
			{{#if sourceType}}
			<span class="input-group-addon">老人能力等级：</span>
				{{#bs-form-element class="inline-block form-input-group" controlType="actionLevel"  property="actionLevel" }}
						{{#power-select class="input-group-content" placeholder='必填' options=actionLevelList  selected=scoreModel.actionLevel searchField="name"
						noMatchesMessage="没有相关内容"	allowClear=false onchange=(action "selectActionLevel" scoreModel ) as |level|}}
							{{level.typename}}
						{{/power-select}}
				{{/bs-form-element}}
			{{else}}
				<span class="input-group-addon">护理等级：</span>
				{{#bs-form-element class="inline-block form-input-group" controlType="level"  property="level" }}
					{{#power-select class="input-group-content" placeholder='必填' options=levelList  selected=scoreModel.level searchField="name"
					noMatchesMessage="没有相关内容"	allowClear=false onchange=(action "selectLevel" scoreModel ) as |level|}}
						{{level.name}}
					{{/power-select}}
				{{/bs-form-element}}
			{{/if}}
		</div>
	</div>
{{/bs-form}}
{{/bs-modal-body}}
{{#bs-modal-footer class="user-add-btn"}}
{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="saveCurScore" saveCurScore="saveCurScore"}}
{{/ui/mix-button}}
{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
{{/ui/mix-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}

{{#if detailQuestion}}
{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")}}
{{#bs-modal-body}}
{{#bs-form name="que-pop" formLayout=formLayout model=questionModel invalid=(action "invalid")}}
	<div class="col-sm-7 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">序号：</span>
			{{#if popQuestion.create}}
			{{#bs-form-element class="inline-block form-input-group" controlType="seq"  property="seq" }}
			{{input class="form-control" type="text" value=popQuestion.curSeq placeholder=popQuestion.order}}
			{{/bs-form-element}}
			{{else}}
			{{#bs-form-element class="inline-block form-input-group" controlType="seq"  property="seq" }}
			{{input class="form-control" type="text" value=popQuestion.curSeq placeholder=popQuestion.seq}}
			{{/bs-form-element}}
			{{/if}}
			<span class="input-group-addon">(问题在模板中的顺序)</span>
		</div>
	</div>
	{{#if isCommunication}}
	<div class="col-sm-5 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">编码：</span>
			{{#if popQuestion.create}}
			{{input class="form-control" type="text" value=popQuestion.code placeholder=''}}
			{{else}}
			{{input class="form-control" type="text" value=popQuestion.code placeholder=''}}
			{{/if}}
		</div>
	</div>
	{{/if}}
	<div class="col-sm-12 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">问题：</span>
			{{#bs-form-element class="inline-block form-input-group" controlType="content"  property="content" }}
			{{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=popQuestion.content placeholder=popQuestion.content}}
			{{/bs-form-element}}
		</div>
	</div>
{{/bs-form}}
	<div class="col-sm-12 nopadding-left">
		<div class="form-input-group">
			<span class="input-group-addon">答案内容：</span>
		</div>
	</div>
	{{#each popQuestion.allAnswerList as |answer index|}}
	{{#bs-form formLayout=formLayout model=answer.answerModel invalid=(action "invalid")}}
	<div class="col-sm-6 nopadding-left" name="answer-content">
		<div class="form-input-group">
			<span class="input-group-addon">{{answer.curIndex}}</span>
			<div class="input-group full-width">
				{{#bs-form-element class="inline-block form-input-group" controlType="content"  property="content" }}
				{{input class="form-control full-width" type="text" placeholder="" value=answer.content}}
				{{/bs-form-element}}
			</div>
		</div>
	</div>
	<div class="col-sm-6 nopadding-left" name="answer-score">
		<div class="form-input-group">
			<span class="input-group-addon">得分</span>
			<div class="input-group full-width">
				{{#bs-form-element class="inline-block form-input-group" controlType="score"  property="score" }}
				{{input class="form-control full-width" type="text" placeholder="" value=answer.score}}
				{{/bs-form-element}}
			</div>
		</div>
	</div>
	{{/bs-form}}
{{/each}}
{{/bs-modal-body}}
{{#bs-modal-footer class="user-add-btn"}}
{{#ui/mix-button class="user-btn edit-btn" id="saveQuestion" iconClass="fa fa-save"  text='确定' clickAction="saveCurQuestion" saveCurQuestion="saveCurQuestion"}}
{{/ui/mix-button}}
{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
{{/ui/mix-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}

<!--删除问卷弹层-->
{{#if delEvaModal}}
{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")}}
{{#bs-modal-header}}
<h3 class="modal-title">删除提示</h3>
{{/bs-modal-header}}
{{#bs-modal-body}}
<h4 class="modal-title">是否删除该条记录？</h4>
{{/bs-modal-body}}

{{#bs-modal-footer as |footer|}}
{{#bs-button action=(action "cancelPassSubmit" evaInfo) type="primary" disabled=prepaidDisabled}}确定{{/bs-button}}
{{#bs-button action=(action "invitation") type="default"}}取消{{/bs-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}
